package com.lubanzhang.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>User: Zhang Kaitao
 * <p>Date: 13-12-22
 * <p>Version: 1.0
 */
//@EnableAutoConfiguration
@RestController
@RequestMapping("/user")
public class UserController {
	
	@Autowired
	IUserService userService;
	
	@RequestMapping("/")
    public String home() {
        return "Hello World!";
    }

    @RequestMapping("/{id}")
    public User view(@PathVariable("id") Long id) {
        return userService.get(id);
    }

}
